package com.itfreer.gis.map.style.entity;

import com.itfreer.form.api.entity.EntityBase;
import com.itfreer.utils.file.FileMeta;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * 定义雪碧图文件实体
 */
@Entity(name = "gis_map_style_sprite")
public class MapStyleSpriteEntity extends EntityBase implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@Id
	@Column(name = "id", length = 50, nullable = false)
	private String id;

	/**
	 * 雪碧图名称
	 */
	@Column(name = "s_name", length = 50, nullable = true)
	private String name;

	/**
	 * 雪碧图文件
	 */
	@Column(name = "s_sprite", columnDefinition = "text", nullable = true)
	private String sprite;

	/**
	 * 排序
	 */
	@Column(name = "i_order", nullable = true)
	private Integer order;
	
	/**
	 * 租户ID
	 */
	@Column(name = "s_tenantid", length = 50, nullable = true)
	private String tenantID;

	/**
	 * 租户名称
	 */
	@Column(name = "s_tenantname", length = 50, nullable = true)
	private String tenantName;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public FileMeta[] getSprite() {
		return super.getFileArray(this.sprite);
	}

	public void setSprite(FileMeta[] sprite) {
		this.sprite = super.getFileString(sprite);
	}

	public Integer getOrder() {
		return order;
	}

	public void setOrder(Integer order) {
		this.order = order;
	}
	
	public String getTenantID() {
		return tenantID;
	}

	public void setTenantID(String tenantID) {
		this.tenantID = tenantID;
	}

	public String getTenantName() {
		return tenantName;
	}

	public void setTenantName(String tenantName) {
		this.tenantName = tenantName;
	}
}
